﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
	<Style x:Key="MainWindowStyle" TargetType="{x:Type Window}">
		<Setter Property="AllowsTransparency" Value="true"/>
		<Setter Property="Background" Value="{x:Null}"/>
		<Setter Property="ResizeMode" Value="CanResizeWithGrip"/>
		<Setter Property="WindowStyle" Value="None"/>
		<Setter Property="Template" Value="{DynamicResource MainWindowControlTemplate}" />
		<Setter Property="BorderThickness" Value="0"/>
	</Style>

	<ControlTemplate x:Key="MainWindowControlTemplate" TargetType="{x:Type Window}">
		<Grid Margin="5">
			<Rectangle RadiusX="0" RadiusY="0" Fill="{DynamicResource BackgroundBrush_Grey}">
				<Rectangle.Effect>
					<DropShadowEffect BlurRadius="6" ShadowDepth="0" Color="#FFBE4600" Opacity="1" RenderingBias="Quality"/>
				</Rectangle.Effect>
			</Rectangle>
			<Border Background="{TemplateBinding Background}"    
				BorderBrush="{TemplateBinding BorderBrush}"    
				BorderThickness="{TemplateBinding BorderThickness}"    
				Padding="{TemplateBinding Margin}"    
				SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"    
				CornerRadius="0">
				<ContentPresenter />
			</Border>
		</Grid>
	</ControlTemplate>

	<Style x:Key="GreenButtonStyle" TargetType="{x:Type Button}">
		<Setter Property="Template" Value="{DynamicResource GreenButtonControlTemplate}" />
		<Setter Property="FontSize" Value="14" />
		<Setter Property="Width" Value="60"/>
		<Setter Property="Height" Value="35"/>
		<Setter Property="Foreground" Value="White" />
		<Setter Property="Margin" Value="5"/>
	</Style>

	<ControlTemplate x:Key="GreenButtonControlTemplate" TargetType="{x:Type Button}">
		<Grid SnapsToDevicePixels="True">
			<VisualStateManager.VisualStateGroups>
				<VisualStateGroup x:Name="CommonStates">
					<VisualState x:Name="MouseOver"/>
					<VisualState x:Name="Pressed"/>
					<VisualState x:Name="Disabled"/>
				</VisualStateGroup>
				<VisualStateGroup x:Name="FocusStates">
					<VisualState x:Name="Focused"/>
				</VisualStateGroup>
				<VisualStateGroup x:Name="ValidationStates">
					<VisualState x:Name="InvalidFocused"/>
					<VisualState x:Name="InvalidUnfocused"/>
				</VisualStateGroup>
			</VisualStateManager.VisualStateGroups>
			<Border x:Name="border" Background="{DynamicResource ButtonBackgroundBrush_Green}" BorderThickness="2" />
			<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}"/>
		</Grid>
		<ControlTemplate.Triggers>
			<Trigger Property="IsFocused" Value="True"/>
			<Trigger Property="IsDefaulted" Value="True"/>
			<Trigger Property="IsMouseOver" Value="True">
				<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource BorderBrush_Grey}" />
				<Setter Property="BorderThickness" TargetName="border" Value="4" />
				<Setter Property="Background"  TargetName="border" Value="{DynamicResource ButtonBackgroundBrush_Yellow}" />
			</Trigger>
			<Trigger Property="IsPressed" Value="True">
				<Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonBackgroundBrush_Yellow_Pressed}" />
				<Setter Property="BorderThickness" TargetName="border" Value="2" />
				<Setter Property="BorderBrush" TargetName="border" Value="{x:Null}" />
			</Trigger>
			<Trigger Property="IsEnabled" Value="False">
				<Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonBackgroundBrush_Grey}" />
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>

	<Style x:Key="CloseButtonStyle" TargetType="{x:Type Button}">
		<Setter Property="Template" Value="{DynamicResource CloseButtonControlTemplate}"/>
	</Style>
	<ControlTemplate x:Key="CloseButtonControlTemplate" TargetType="{x:Type Button}">
		<Grid>
			<VisualStateManager.VisualStateGroups>
				<VisualStateGroup x:Name="CommonStates">
					<VisualState x:Name="MouseOver"/>
					<VisualState x:Name="Pressed"/>
					<VisualState x:Name="Disabled"/>
				</VisualStateGroup>
				<VisualStateGroup x:Name="FocusStates">
					<VisualState x:Name="Focused"/>
				</VisualStateGroup>
				<VisualStateGroup x:Name="ValidationStates">
					<VisualState x:Name="InvalidFocused"/>
					<VisualState x:Name="InvalidUnfocused"/>
				</VisualStateGroup>
			</VisualStateManager.VisualStateGroups>
			<Border x:Name="CloseButtonBorder" BorderBrush="{DynamicResource CloseButtonBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{DynamicResource CloseButtonBackground}" />
			<Border x:Name="CloseButtonInnerBorder" HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Stretch" SnapsToDevicePixels="True" Background="#00000000">
				<Path x:Name="CloseButtonPath" Data="M0,0 L2.1779997,0 4.9874997,2.9132754 7.7969999,0 9.9750004,0 6.0764999,4.0425005 9.9749994,8.085 7.7969995,8.085 4.9874997,5.1717248 2.178,8.085 0,8.085 3.8985,4.0425 z" Fill="#B2FFFFFF" Height="8.08500003814697" Stretch="Fill" Width="9.975" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0"/>
			</Border>
		</Grid>
		<ControlTemplate.Triggers>
			<Trigger Property="IsFocused" Value="True"/>
			<Trigger Property="IsDefaulted" Value="True"/>
			<Trigger Property="IsMouseOver" Value="True">
				<Setter TargetName="CloseButtonBorder" Property="Background" Value="{DynamicResource ResourceKey=CloseButtonMouseOverBackground}" />
				<Setter TargetName="CloseButtonBorder" Property="BorderBrush" Value="{DynamicResource CloseButtonMouseOverBorderBrush}" />
				<Setter TargetName="CloseButtonPath" Property="Fill" Value="White"/>
			</Trigger>
			<Trigger Property="IsPressed" Value="True">
				<Setter TargetName="CloseButtonBorder" Property="Background" Value="{DynamicResource ResourceKey=CloseButtonPressedBackground}" />
			</Trigger>
			<Trigger Property="IsEnabled" Value="False"/>
		</ControlTemplate.Triggers>
	</ControlTemplate>
	<Style x:Key="MinimizeButtonStyle" TargetType="{x:Type Button}">
		<Setter Property="Template" Value="{DynamicResource MinimizeButtonControlTemplate}"/>
	</Style>
	<ControlTemplate x:Key="MinimizeButtonControlTemplate" TargetType="{x:Type Button}">
		<Grid>
			<VisualStateManager.VisualStateGroups>
				<VisualStateGroup x:Name="CommonStates">
					<VisualState x:Name="MouseOver"/>
					<VisualState x:Name="Pressed"/>
					<VisualState x:Name="Disabled"/>
				</VisualStateGroup>
				<VisualStateGroup x:Name="FocusStates">
					<VisualState x:Name="Focused"/>
				</VisualStateGroup>
				<VisualStateGroup x:Name="ValidationStates">
					<VisualState x:Name="InvalidFocused"/>
					<VisualState x:Name="InvalidUnfocused"/>
				</VisualStateGroup>
			</VisualStateManager.VisualStateGroups>
			<Border x:Name="MinimizeButtonBorder" BorderBrush="{DynamicResource CloseButtonBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{DynamicResource MinimizeButtonBackground}" />
			<Border x:Name="MinimizeButtonInnerBorder" HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Stretch" SnapsToDevicePixels="True" Background="#00000000">
				<Path x:Name="MinimizeButtonPath" Data="F1M0,3L9.084,3L9.084,0.313L0,0.313z" Fill="#B2FFFFFF" Height="3" Stretch="Fill" Width="9" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0"/>
			</Border>
		</Grid>
		<ControlTemplate.Triggers>
			<Trigger Property="IsFocused" Value="True"/>
			<Trigger Property="IsDefaulted" Value="True"/>
			<Trigger Property="IsMouseOver" Value="True">
				<Setter TargetName="MinimizeButtonBorder" Property="Background" Value="{DynamicResource MinimizeButtonMouseOverBackground}" />
				<Setter TargetName="MinimizeButtonBorder" Property="BorderBrush" Value="{DynamicResource CloseButtonMouseOverBorderBrush}" />
				<Setter TargetName="MinimizeButtonPath" Property="Fill" Value="White"/>
			</Trigger>
			<Trigger Property="IsPressed" Value="True">
				<Setter TargetName="MinimizeButtonBorder" Property="Background" Value="{DynamicResource ResourceKey=MinimizeButtonPressedBackground}" />
			</Trigger>
			<Trigger Property="IsEnabled" Value="False"/>
		</ControlTemplate.Triggers>
	</ControlTemplate>

	<Style x:Key="TopTitleBarStyle" TargetType="{x:Type Grid}">
		<Setter Property="Width" Value="Auto"/>
		<Setter Property="Height" Value="Auto"/>
		<Setter Property="Background" Value="#FF6FA3FF"/>
		<Setter Property="Margin" Value="0"/>
	</Style>

	<Style x:Key="BoldTextBlockStyle" TargetType="{x:Type TextBlock}">
		<Setter Property="FontWeight" Value="Bold"/>
		<Setter Property="HorizontalAlignment" Value="Center"/>
		<Setter Property="VerticalAlignment" Value="Center"/>
		<Setter Property="Width" Value="Auto"/>
		<Setter Property="Height" Value="Auto"/>
		<Setter Property="FontSize" Value="14"/>
	</Style>

	<Style x:Key="TextBoxStyle" TargetType="{x:Type TextBox}">
		<Setter Property="FontSize" Value="14"/>
		<Setter Property="Background" Value="{DynamicResource BackgroundBrush_LightYellow}"/>
		<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush_Green}"/>
		<Setter Property="BorderThickness" Value="2"/>
		<Setter Property="HorizontalAlignment" Value="Stretch"/>
		<Setter Property="VerticalAlignment" Value="Stretch"/>
		<Setter Property="Margin" Value="0,5,20,5"/>
		<Setter Property="TextWrapping" Value="Wrap"/>
	</Style>

	<ControlTemplate x:Key="ListBoxControlTemplate" TargetType="{x:Type ListBox}">

		<Border BorderBrush="#FF5B85FF" Background="{DynamicResource ResourceKey=ListBoxItemBackground}" BorderThickness="2" SnapsToDevicePixels="True" d:LayoutOverrides="Width" Margin="0" Grid.Row="1">
			<ScrollViewer x:Name="scrollViewer" HorizontalScrollBarVisibility="Disabled" Margin="0">
				<ItemsPresenter Margin="0" />
			</ScrollViewer>
		</Border>

	</ControlTemplate>

	<Style x:Key="ListBoxItemStyle_Normal" TargetType="{x:Type ListBoxItem}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ListBoxItem}">
					<Border x:Name="b1" SnapsToDevicePixels="True" >
						<ContentPresenter/>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsSelected" Value="True">
							<Setter Property="Background" Value="{DynamicResource ResourceKey=ListBoxSelectedItemBackground}" TargetName="b1"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>


	<DataTemplate x:Key="ListChildDataTemplate">
		<Border BorderBrush="{DynamicResource ListBoxItemsDividingLineBrush}" BorderThickness="0,0,0,0" Margin="0" Height="Auto" Width="Auto" d:DesignWidth="461" HorizontalAlignment="Stretch">
			<Grid Height="Auto" Margin="0" Width="Auto">
				<Grid.RowDefinitions>
					<RowDefinition Height="0.641*"/>
					<RowDefinition Height="0.359*"/>
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="*"/>
					<ColumnDefinition Width="176"/>
					<ColumnDefinition Width="60"/>
				</Grid.ColumnDefinitions>
				<TextBlock x:Name="TextBlockId" Text="{Binding list_child_id}" Visibility="Collapsed"  VerticalAlignment="Top" Grid.ColumnSpan="3"  />
				<TextBlock x:Name="TextBlockTitle" Text="{Binding list_child_title}" FontWeight="Bold" FontSize="14" Width="Auto" Margin="0" d:LayoutOverrides="Height"  Padding="12,5,5,1" VerticalAlignment="Stretch" TextTrimming="CharacterEllipsis"  />
				<TextBlock x:Name="TextBlockDetail" Text="{Binding list_child_detail}" FontSize="12"    Margin="0" Grid.ColumnSpan="1" Grid.Row="1" d:LayoutOverrides="Height" Padding="12,1,5,5" VerticalAlignment="Stretch" TextTrimming="CharacterEllipsis"   />
				<DockPanel Grid.Column="2" Margin="0" Grid.RowSpan="2" d:LayoutOverrides="GridBox">
					<Label x:Name="TextBlockMark" Content="{Binding list_child_mark}" Margin="0" Width="Auto" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Padding="0"/>
				</DockPanel>
				<Border BorderBrush="#FFE3D5B2" BorderThickness="1,0" Height="Auto" Margin="0,0,0,-0.002" Grid.Row="0" Grid.Column="1" Grid.RowSpan="2">
					<Grid Margin="0">
						<Grid.RowDefinitions>
							<RowDefinition Height="0.5*"/>
							<RowDefinition Height="0.5*"/>
						</Grid.RowDefinitions>
						<Label x:Name="TextBlockStartTime" Content="{Binding list_child_start_time}" Height="Auto" Margin="0"  FontSize="12" HorizontalContentAlignment="Center" VerticalContentAlignment="Bottom" Padding="0" VerticalAlignment="Stretch"/>
						<Label x:Name="TextBlockEndTime"  Content="{Binding list_child_end_time}" Height="Auto" Margin="0"  FontSize="12" HorizontalAlignment="Stretch"  Width="Auto" VerticalContentAlignment="Top" HorizontalContentAlignment="Center" Padding="0" VerticalAlignment="Stretch" Grid.Row="1" />
					</Grid>
				</Border>
			</Grid>
		</Border>
	</DataTemplate>
	<Style x:Key="ListBoxItemStyle_Finished" TargetType="{x:Type ListBoxItem}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ListBoxItem}">
					<Border x:Name="b1" Background="#FFb1ff8e" SnapsToDevicePixels="True" >
						<ContentPresenter/>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsSelected" Value="True">
							<Setter Property="Background" Value="#FFaad4ff" TargetName="b1"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<DataTemplate x:Key="ListFamilyDataTemplate">
		<Grid Height="Auto" Margin="0" Width="Auto" d:DesignWidth="108" >
			<Grid.RowDefinitions>
				<RowDefinition Height="0.6*"/>
				<RowDefinition Height="0.4*"/>
			</Grid.RowDefinitions>
			<TextBlock x:Name="TextBlockId" Text="{Binding list_family_id}" Visibility="Collapsed"  VerticalAlignment="Top"  />
			<TextBlock x:Name="TextBlockTitle" Text="{Binding list_family_title}" FontWeight="Bold" FontSize="14" Margin="0" d:LayoutOverrides="Height" Padding="12,5,5,1" />
			<TextBlock x:Name="TextBlockDetail" Text="{Binding list_family_detail}" FontSize="12" TextTrimming="CharacterEllipsis" Margin="0" VerticalAlignment="Stretch" Grid.Row="1" d:LayoutOverrides="Height" Padding="12,1,5,5" />
		</Grid>
	</DataTemplate>
	<Style x:Key="HyperlinkStyle" TargetType="{x:Type Hyperlink}">
		<Setter Property="Foreground" Value="{DynamicResource HyperlinkForeground}"/>
		<Setter  Property ="TextBlock.TextDecorations" Value ="{x:Null}" />
		<Style.Triggers >
			<Trigger Property ="IsMouseOver" Value ="True" >
				<Setter  Property ="Foreground" Value ="{DynamicResource HyperlinkMouseOverForeground}" />
				<Setter  Property ="TextBlock.TextDecorations" >
					<Setter.Value >
						<TextDecorationCollection >
							<TextDecoration  Location ="Underline" />
						</TextDecorationCollection>
					</Setter.Value>
				</Setter>
			</Trigger>
		</Style.Triggers>
	</Style>
</ResourceDictionary>